package cn.ywang.shallow;

import java.util.ArrayList;
import java.util.List;

/**
 * @Auther: BeatificWang
 * @Date: 2018/9/23 23:15
 */
public class ProtoType implements Cloneable {
	private String name = "";
	private List<String> list = new ArrayList<>();

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<String> getList() {
		return this.list;
	}

	public void setList(List<String> list) {
		this.list = list;
	}

	public void addList(String s) {
		this.list.add(s);
	}

	// 此处为浅拷贝
	@Override
	protected ProtoType clone() throws CloneNotSupportedException {
		ProtoType protoType = (ProtoType) super.clone();
		return protoType;
	}
}
